package com.yonyou.pmclouds.basecom.multilanguage;

import java.util.Locale;

public enum Language {

	SIMPLIFIEDCHINESE(Locale.SIMPLIFIED_CHINESE), ENGLISH(Locale.ENGLISH);

	private Locale value;

    Language(Locale locale) {
		this.value = locale;
	}

	public Locale getValue() {
		return value;
	}

	public static Language getLanguage(Locale locale) {
		for (Language langEnum : Language.values()) {
			if (langEnum.getValue().equals(locale)) {
				return langEnum;
			}
		}
		return null;
	}
}
